import re

p = r"\d+"

s1 = "abc123"
s2 = "1234"

m = re.match(p, s1)
if m:
	print("%s matched by %s" % (s1,p))


m2 = re.match(p,s2)
if(m2):
	print("%s matched by %s" % (s2,p))
	# print(dir(m2))


arr = re.split(r"\s+", "a b  ccc d     f")
print(arr)

p2 = r"(\w+)d";
m3 = re.match(p2, s1)
if(m3):
	print("group(0) >> ",m3.group(0),"group(1) >>> ", m3.group(1))

